<template>
	<view>
		<view class="classify">
			<view class="classify-l" @click="calendar">
				所有时间段
				<image src="../../static/slice/1.png" mode=""></image>
			</view>
			<view class="classify-l" @click="showdow">
				全部员工
				<image src="../../static/slice/1.png" mode=""></image>
			</view>
			<view class="classify-l">
				全部采购单
				<image src="../../static/slice/1.png" mode=""></image>
			</view>
		</view>
		<!-- 下拉框 -->
		<view :class="{ show: show }" class="combobox">
			<view class="show-li" @click="showtrue">
				今日数据
				<image src="../../static/slice/gou.png" mode="" :class="{ showtrue: showtru }"></image>
			</view>
			<view class="show-li">昨日数据</view>
			<view class="show-li">七日数据</view>
			<view class="show-li">30日数据</view>
		</view>
		<view class="ima" v-show="wd"><image src="../../static/slice/86438f8f6d0029f503d57efb448590f.png" mode=""></image></view>
		<!-- 订单数据 -->
		<view class="information">
			<view class="information-t">
				<view class="">采购单号：553656</view>
				<image src="../../static/spe/02.png" mode=""></image>
			</view>
			<view class="information-b">
				<view class="box">
					<view class="box-l">
						零散供应商
					</view>
					<view class="box-r black">
						已完成
					</view>
				</view>
				<view class="box">
					<view class="box-l black">
					202020-5551
					</view>
					<view class="box-r">
						
					</view>
				</view>
				<view class="box">
					<view class="box-l">
						订单金额: ¥90.00
					</view>
					<view class="box-r">
						19
					</view>
				</view>
			</view>
		</view>
		<!-- 日历弹框 -->
		<view class="tankuang" :class="{ timeshow: timeshow }">
			<view class="t-o">选择时间</view>
			<view class="t-w">
				<view class="t-left">开始时间</view>
				<view @click="showcalendar(0)">{{ fulldate }}</view>
			</view>
			<view class="t-w">
				<view class="t-left">结束时间</view>
				<view @click="showcalendar(1)">{{ endTime }}</view>
			</view>
			<view class="t-s">
				<view class="s-left" @click="closetimes">取消</view>
				<view class="s-right">确定</view>
			</view>
		</view>
		<!-- 日历 -->
		<view class="mycalendar" :style="{ top: insert ? '0' : '100%' }">
			<uni-calendar :lunar="true" :start-date="'1998-3-19'" :end-date="'2099-5-20'" @change="change"></uni-calendar>
		</view>
	</view>
</template>

<script>
import uniCalendar from '@/components/uni-calendar/uni-calendar.vue';
import uniIcons from '@/components/uni-icons/uni-icons.vue';
export default {
	components: {
		uniIcons,
		uniCalendar
	},
	data() {
		return {
			timeshow: true,
			insert: false,
			fulldate: '2020-03-05',
			type: 0,
			endTime: '2010-05-00',
			show: true,
			showtru: true,
			wd: false //订单数据
		};
	},
	methods: {
		calendar() {
			if (this.timeshow) {
				this.timeshow = false;
			} else {
				this.timeshow = true;
			}
		},
		closetimes() {
			this.timeshow = true;
		},
		showcalendar(type) {
			this.type = type;
			(this.insert = true), (this.timeshow = true);
		},
		change(e) {
			(this.insert = false), (this.timeshow = false);
			if (this.type == 0) {
				this.fulldate = e.fulldate;
			} else {
				this.endTime = e.fulldate;
			}
		},
		showdow() {
			if (this.show) {
				this.show = false;
			} else {
				this.show = true;
			}
		},

		showtrue() {
			if (this.showtru) {
				this.showtru = false;
			} else {
				this.showtru = true;
			}
		}
	}
};
</script>

<style lang="scss">
page {
	background-color: #f5f5f5;
}
.header {
	width: 750rpx;
	height: 88rpx;
	background: rgba(0, 130, 232, 1);
	padding: 27rpx 304rpx;
	.header-s {
		width: 143rpx;
		height: 34rpx;
		font-size: 36rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: rgba(255, 255, 255, 1);
		line-height: 48rpx;
	}
}
.seach {
	width: 750rpx;
	height: 107rpx;
	background: #249AF6;
	padding-left: 32rpx;
	display: flex;

	.seach-s {
		width: 700rpx;
		height: 60rpx;
		background: rgba(255, 255, 255, 1);
		border-radius: 99999rpx;
		padding-left: 27rpx;
		display: flex;
		box-sizing: border-box;
		input {
			padding-top: 10rpx;
			border-style: none;
			padding-left: 34rpx;
		}
		image {
			width: 31rpx;
			height: 28rpx;
			margin-top: 15rpx;
			margin-right: 20rpx;
		}
	}
	.seach-e {
		image {
			width: 44rpx;
			height: 44rpx;
			margin-top: 12rpx;
			margin-left: 10rpx;
		}
	}
}
.classify {
	display: flex;
	background-color: #ffffff;
	justify-content: space-around;
	font-size: 32rpx;
	font-family: PingFang SC;
	font-weight: 500;
	color: rgba(51, 51, 51, 1);
	height: 90rpx;
	line-height: 90rpx;
	image {
		width: 17rpx;
		height: 10rpx;
		margin-left: 11rpx;
	}
}
.ima {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 227rpx;
	image {
		width: 370upx;
		height: 390upx;
	}
}
.tankuang {
	width: 642rpx;
	height: 400rpx;
	position: fixed;
	background-color: #ffffff;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	.t-o {
		height: 100rpx;
		line-height: 100rpx;
		text-align: center;
		border-bottom: 3rpx solid #eeeeee;
	}
	.t-w {
		height: 100rpx;
		line-height: 100rpx;
		display: flex;
		justify-content: space-around;
		border-bottom: 3rpx solid #eeeeee;
		.t-left {
			color: #666666;
		}
	}
	.t-s {
		height: 100rpx;
		line-height: 100rpx;
		display: flex;
		justify-content: space-evenly;
		.s-left {
			color: #666666;
		}
		.s-right {
			color: #249af6;
		}
	}
}
.timeshow {
	display: none;
}
.mycalendar {
	width: 100%;
	height: 100%;
	position: fixed;
	bottom: 0;
	transition: all 0.5s;
}
.combobox {
	z-index: 2;

	width: 100%;
	background-color: #ffffff;
	position: fixed;
	font-size: 30rpx;
	font-family: PingFang SC;
	font-weight: 500;
	color: #333333;
	line-height: 48rpx;
	padding-left: 30rpx;
	.show-li {
		height: 90rpx;
		line-height: 90rpx;
		border-bottom: 2rpx solid #eeeeee;
		image {
			width: 38rpx;
			height: 32rpx;
			margin: 50rpx;
			float: right;
		}
	}
}
.information {
	margin-top: 20rpx;
	// height: 323rpx;
	background-color: #ffffff;
	padding: 32rpx;
	box-sizing: border-box;
	.information-t {
		height: 110rpx;
		display: flex;
		justify-content: space-between;
		border-bottom: 3rpx solid #eeeeee;
		font-size: 32rpx;
		font-family: PingFang SC;
		font-weight: 500;
		image {
			width: 40rpx;
			height: 40rpx;
		}
	}
	.information-b{
		.box{
			display: flex;
			justify-content: space-between;
			font-size:32rpx;
			font-family:PingFang SC;
			font-weight:500;
			line-height:36px;
		}
	}
}
.show {
	display: none;
}
.show-li:hover {
	color: #249af6;
}
.showtrue {
	display: none;
}
.black{
	font-size:30rpx;
	font-family:PingFang SC;
	font-weight:500;
	color:rgba(102,102,102,1);
}
</style>
